<template>
  <div>
    <Header />
    <router-view></router-view>
    <Footer v-show="!$route.meta.isHidden" />
  </div>
</template>

<script>
import Header from "@comp/Header/Header.vue";
import Footer from "@comp/Footer/Footer.vue";
import { mapActions } from "vuex";

export default {
  name: "App",
  mounted() {
    //公共组件切换重复请求三级列表数据,放在app中,请求只执行一次,路由组件缓存keep-alive只能在路由组件中使用
    //初始请求分类导航三级列表
    this.getCategoryListAction();
  },
  components: {
    Header,
    Footer,
  },
  methods: {
    ...mapActions("home", ["getCategoryListAction"]),
  },
};
</script>

<style >
</style>